<template>
    <div id="Rights">
        <my-breadcrumb/>
         <el-row class="main">
            <!-- 表格 -->
            <el-row>
                <my-table-one :tableOptions='tableOptions' :tableData='tableData'>
                    <template #tags='scope'>
                        <div>
                           <my-tag :levelData='scope.slotData.level'/> 
                        </div>
                    </template> 
                </my-table-one>
            </el-row>
        </el-row>
    </div>
</template>
<script>
export default {
     name:'Rights',
     data() {
        return {
             tableOptions:[
                {prop:'authName',label:'权限名称',width:'200'},
                {prop:'path',label:'路径',width:'200'},
                {prop:'level',label:'权限等级',width:'200',slot:'tags'},
            ],
            tableData: [],
        }
    },
    mounted(){
        this.$store.dispatch('role/Acs_getAllRights')
        .then(res=>{
            //console.log(res);
            this.tableData=res;
        })
        .catch(err=>{
            console.log(err);
        })
    }
}
</script>
<style lang="scss" scoped>
    #Rights{
        .main{
            margin-top: 15px;
            background: #fff;
            padding: 20px;
        }    
    }
</style>